{"componentChunkName":"component---node-modules-rocketseat-gatsby-theme-docs-core-src-templates-docs-query-js","path":"/code-style/AccessControlFacetStorage-ACS","result":{"data":{"mdx":{"id":"b89012e3-d4da-5107-b7b3-5e634006de3e","excerpt":"ACS-01C: Non-Standard Storage Slot Definition Type Severity Location Standard Conformity AccessControlFacetStorage.sol:L60 Description: The referenced…","fields":{"slug":"/code-style/AccessControlFacetStorage-ACS/"},"frontmatter":{"title":"AccessControlFacetStorage Code Style Findings","description":"Contains all the findings that relate to code style on the contract codebase","image":null,"disableTableOfContents":null},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"AccessControlFacetStorage Code Style Findings\",\n  \"description\": \"Contains all the findings that relate to code style on the contract codebase\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idacs-01cacs-01c-non-standard-storage-slot-definitionspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idacs-01cacs-01c-non-standard-storage-slot-definitionspan\",\n    \"aria-label\": \"span idacs 01cacs 01c non standard storage slot definitionspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ACS-01C\"\n  }, \"ACS-01C: Non-Standard Storage Slot Definition\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/evergon-labs-tmi-staking-protocol-674eaeb16dc0450018dd65fb/appendix/finding-types#standard-conformity\"\n  }, \"Standard Conformity\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L60\"\n  }, \"AccessControlFacetStorage.sol:L60\"))))), mdx(\"h3\", {\n    \"id\": \"description\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description\",\n    \"aria-label\": \"description permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced declaration will define a storage slot for use by a facet of the system's main \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://eips.ethereum.org/EIPS/eip-2535\"\n  }, \"EIP-2535\"), \" Diamond, however, the way it is declared does not adhere to the latest standards.\"), mdx(\"h3\", {\n    \"id\": \"example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example\",\n    \"aria-label\": \"example permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol highlight={2} lineNumbers=true lineOffset=58\",\n    \"title\": \"packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol\",\n    \"highlight\": \"{2}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"58\"\n  }, \"/// @dev Unique identifier for the storage slot where the Layout struct is stored.\\nbytes32 internal constant STORAGE_SLOT = keccak256(\\\"evergonlabs.Staking.storage.AccessControlFacetStorage\\\");\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation\",\n    \"aria-label\": \"recommendation permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://eips.ethereum.org/EIPS/eip-7201\"\n  }, \"EIP-7201\"), \" name-spaced layout approach to be adhered to similarly to OpenZeppelin and other relevant standard libraries, ensuring consistency among the ecosystem's widely utilized libraries and conforming to the latest standards.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0\",\n    \"aria-label\": \"alleviation b64b659786cf3c84bea52feb3a69f546ba3601f0 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):\"), mdx(\"p\", null, \"The referenced slot definition has been updated to its standardized \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://eips.ethereum.org/EIPS/eip-7201\"\n  }, \"EIP-7201\"), \" representation, addressing this exhibit.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/evergonlabs/StakingProtocol\",\n    mainHash: \"dd3cd83a38dbea2dad34f7dc82c835f1793d5459\",\n    fixHash: \"b64b659786cf3c84bea52feb3a69f546ba3601f0\",\n    gitHubIssue: \"0\",\n    mdxType: \"ViewDiffButton\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idacs-02cacs-02c-non-streamlined-codespan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idacs-02cacs-02c-non-streamlined-codespan\",\n    \"aria-label\": \"span idacs 02cacs 02c non streamlined codespan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ACS-02C\"\n  }, \"ACS-02C: Non-Streamlined Code\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/evergon-labs-tmi-staking-protocol-674eaeb16dc0450018dd65fb/appendix/finding-types#standard-conformity\"\n  }, \"Standard Conformity\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L110\"\n  }, \"AccessControlFacetStorage.sol:L110\"), \", \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L160\"\n  }, \"L160\"), \", \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L162\"\n  }, \"L162\"))))), mdx(\"h3\", {\n    \"id\": \"description-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-1\",\n    \"aria-label\": \"description 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L159-L163\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::hasRole\")), \" and \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L90-L99\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::onlyRole\")), \" functions do not contain streamlined code as both repeat the same statements with the former containing two \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"return\"), \" statements inefficiently.\"), mdx(\"h3\", {\n    \"id\": \"example-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-1\",\n    \"aria-label\": \"example 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol highlight={2,4} lineNumbers=true lineOffset=158\",\n    \"title\": \"packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol\",\n    \"highlight\": \"{2,4}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"158\"\n  }, \"function hasRole(Layout storage l, bytes32 role, address account) internal view returns (bool) {\\n    if (role == OPEN_ROLE) return true;\\n\\n    return l.hasRole_[account][role];\\n}\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-1\",\n    \"aria-label\": \"recommendation 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L159-L163\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::hasRole\")), \" function to join the two return statements into one using the OR conditional clause (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"||\"), \"), and the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L90-L99\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::onlyRole\")), \" function to invoke the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L159-L163\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::hasRole\")), \" function greatly increasing the code's legibility and standardization.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0-1\",\n    \"aria-label\": \"alleviation b64b659786cf3c84bea52feb3a69f546ba3601f0 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/b64b659786cf3c84bea52feb3a69f546ba3601f0/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L90-L99\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::onlyRole\")), \" function properly invokes the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/b64b659786cf3c84bea52feb3a69f546ba3601f0/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L159-L163\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"AccessControlFacetStorage::hasRole\")), \" function to evaluate whether the caller has the relevant role, standardizing the codebase.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/evergonlabs/StakingProtocol\",\n    mainHash: \"dd3cd83a38dbea2dad34f7dc82c835f1793d5459\",\n    fixHash: \"b64b659786cf3c84bea52feb3a69f546ba3601f0\",\n    gitHubIssue: \"0\",\n    mdxType: \"ViewDiffButton\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idacs-03cacs-03c-potentially-inefficient-mapping-layoutsspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idacs-03cacs-03c-potentially-inefficient-mapping-layoutsspan\",\n    \"aria-label\": \"span idacs 03cacs 03c potentially inefficient mapping layoutsspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ACS-03C\"\n  }, \"ACS-03C: Potentially Inefficient Mapping Layouts\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/evergon-labs-tmi-staking-protocol-674eaeb16dc0450018dd65fb/appendix/finding-types#gas-optimization\"\n  }, \"Gas Optimization\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"b\", null, \"AccessControlFacetStorage.sol\"), \":\", mdx(\"br\", null), \"\\u2022 \", mdx(\"span\", {\n    title: \"Instance 1\"\n  }, \"I-1:\"), \" \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L238\"\n  }, \"L238\"), mdx(\"br\", null), \"\\u2022 \", mdx(\"span\", {\n    title: \"Instance 2\"\n  }, \"I-2:\"), \" \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L267\"\n  }, \"L267\"), mdx(\"br\", null), \"\\u2022 \", mdx(\"span\", {\n    title: \"Instance 3\"\n  }, \"I-3:\"), \" \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L323\"\n  }, \"L323\"), mdx(\"br\", null), \"\\u2022 \", mdx(\"span\", {\n    title: \"Instance 4\"\n  }, \"I-4:\"), \" \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L352\"\n  }, \"L352\"))))), mdx(\"h3\", {\n    \"id\": \"description-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-2\",\n    \"aria-label\": \"description 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"mapping\"), \" declarations are inefficiently ordered as they do not follow the optimal widening approach.\"), mdx(\"p\", null, \"Specifically, \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"mapping\"), \" relations should be declared from the lowest subset to the greatest subset to permit caching of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"keccak256\"), \" offsets and thus optimizations.\"), mdx(\"h3\", {\n    \"id\": \"example-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-2\",\n    \"aria-label\": \"example 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol highlight={18,40} lineNumbers=true lineOffset=198\",\n    \"title\": \"packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol\",\n    \"highlight\": \"{18,40}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"198\"\n  }, \"/**\\n * @notice Grants `role` to `account` within the context of a specified staking campaign.\\n * @dev Only callable by the Admin or a handler of `role`.\\n * @param l A reference to the Layout struct in storage.\\n * @param campaignId The unique identifier of the targeted staking campaign.\\n * @param role The identifier of the role to grant.\\n * @param account The address to grant `role` to.\\n */\\nfunction grantRoleForId(\\n    Layout storage l,\\n    uint256 campaignId,\\n    bytes32 role,\\n    address account\\n) internal onlyRoleHandler(role) {\\n    if (campaignId == 0) {\\n        revert InvalidCampaignIdZero();\\n    }\\n    l.hasRoleForId_[campaignId][account][role] = true;\\n}\\n\\n/**\\n * @notice Grants `role` to multiple `accounts` within the context of the staking platform.\\n * @dev Only callable by the Admin or a handler of `role`.\\n * @param l A reference to the Layout struct in storage.\\n * @param role The identifier of the role to grant.\\n * @param accounts An array of addresses to grant `role` to.\\n */\\nfunction grantRoleMultiple(\\n    Layout storage l,\\n    bytes32 role,\\n    address[] calldata accounts\\n) internal onlyRoleHandler(role) {\\n    uint256 length = accounts.length;\\n\\n    if (length == 0) {\\n        revert ZeroAccountsToGrant();\\n    }\\n\\n    for (uint256 i = 0; i < length; i++) {\\n        l.hasRole_[accounts[i]][role] = true;\\n    }\\n}\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-2\",\n    \"aria-label\": \"recommendation 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hasRole_\"), \" mapping should be point a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"role\"), \" to the accounts that possess it permitting the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hasRole_[role]\"), \" mapping to be cached in the referenced instances, and the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hasRoleForId_\"), \" should be similarly restructured to point a campaign ID to a role to the accounts that possess it allowing the same optimization to be applied.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-b64b659786\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-b64b659786\",\n    \"aria-label\": \"alleviation b64b659786 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (b64b659786):\"), mdx(\"p\", null, \"While the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"mapping\"), \" declarations themselves were updated as advised, the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"mapping\"), \" offset caching optimizations have not been applied.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-5312126fb2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-5312126fb2\",\n    \"aria-label\": \"alleviation 5312126fb2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (5312126fb2):\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"mapping\"), \" optimizations have been applied as advised, greatly reducing the gas cost involved in each \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"for\"), \" loop that repetitively accesses subsets of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"mapping\"), \".\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/evergonlabs/StakingProtocol\",\n    mainHash: \"dd3cd83a38dbea2dad34f7dc82c835f1793d5459\",\n    fixHash: \"5312126fb20104132881faa286dfe70210906584\",\n    gitHubIssue: \"0\",\n    mdxType: \"ViewDiffButton\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idacs-04cacs-04c-reduced-legibility-of-conditionalsspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idacs-04cacs-04c-reduced-legibility-of-conditionalsspan\",\n    \"aria-label\": \"span idacs 04cacs 04c reduced legibility of conditionalsspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ACS-04C\"\n  }, \"ACS-04C: Reduced Legibility of Conditionals\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/evergon-labs-tmi-staking-protocol-674eaeb16dc0450018dd65fb/appendix/finding-types#code-style\"\n  }, \"Code Style\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L95\"\n  }, \"AccessControlFacetStorage.sol:L95\"), \", \", mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L110\"\n  }, \"L110\"))))), mdx(\"h3\", {\n    \"id\": \"description-3\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-3\",\n    \"aria-label\": \"description 3 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced conditionals will perform a negation on a multi-component logical joint statement which we believe hurts the code's readability.\"), mdx(\"h3\", {\n    \"id\": \"example-3\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-3\",\n    \"aria-label\": \"example 3 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol highlight={1} lineNumbers=true lineOffset=94\",\n    \"title\": \"packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol\",\n    \"highlight\": \"{1}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"94\"\n  }, \"if (!(layout().canHandleRole[msg.sender][role] || layout().hasRole_[msg.sender][ADMIN_ROLE])) {\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-3\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-3\",\n    \"aria-label\": \"recommendation 3 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise the negation to be incorporated into the condition itself, increasing the logical operations by one but significantly increasing the code's legibility.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0-2\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0-2\",\n    \"aria-label\": \"alleviation b64b659786cf3c84bea52feb3a69f546ba3601f0 2 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):\"), mdx(\"p\", null, \"The code was updated to utilize an interim \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"bool\"), \" variable instead that is negated, properly depicting its value via its name and thus addressing the exhibits legibility concerns.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/evergonlabs/StakingProtocol\",\n    mainHash: \"dd3cd83a38dbea2dad34f7dc82c835f1793d5459\",\n    fixHash: \"b64b659786cf3c84bea52feb3a69f546ba3601f0\",\n    gitHubIssue: \"0\",\n    mdxType: \"ViewDiffButton\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idacs-05cacs-05c-repetitive-invocations-of-layoutspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idacs-05cacs-05c-repetitive-invocations-of-layoutspan\",\n    \"aria-label\": \"span idacs 05cacs 05c repetitive invocations of layoutspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ACS-05C\"\n  }, \"ACS-05C: Repetitive Invocations of Layout\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/evergon-labs-tmi-staking-protocol-674eaeb16dc0450018dd65fb/appendix/finding-types#gas-optimization\"\n  }, \"Gas Optimization\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/evergonlabs/StakingProtocol/blob/dd3cd83a38dbea2dad34f7dc82c835f1793d5459/packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol#L95\"\n  }, \"AccessControlFacetStorage.sol:L95\"))))), mdx(\"h3\", {\n    \"id\": \"description-4\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-4\",\n    \"aria-label\": \"description 4 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced statements will repetitively invoke the facet's layout storage pointer inefficiently.\"), mdx(\"h3\", {\n    \"id\": \"example-4\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-4\",\n    \"aria-label\": \"example 4 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol highlight={1} lineNumbers=true lineOffset=94\",\n    \"title\": \"packages/contracts/contracts/genericFacets/accessControlFacet/AccessControlFacetStorage.sol\",\n    \"highlight\": \"{1}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"94\"\n  }, \"if (!(layout().canHandleRole[msg.sender][role] || layout().hasRole_[msg.sender][ADMIN_ROLE])) {\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-4\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-4\",\n    \"aria-label\": \"recommendation 4 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise it to be invoked once, stored to a local variable, and consequently re-used as many times as needed.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0-3\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-b64b659786cf3c84bea52feb3a69f546ba3601f0-3\",\n    \"aria-label\": \"alleviation b64b659786cf3c84bea52feb3a69f546ba3601f0 3 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):\"), mdx(\"p\", null, \"The layout pointer is properly cached optimizing the code's gas cost.\"), mdx(ViewDiffButton, {\n    repoUrl: \"https://github.com/evergonlabs/StakingProtocol\",\n    mainHash: \"dd3cd83a38dbea2dad34f7dc82c835f1793d5459\",\n    fixHash: \"b64b659786cf3c84bea52feb3a69f546ba3601f0\",\n    gitHubIssue: \"0\",\n    mdxType: \"ViewDiffButton\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","headings":[{"depth":2,"value":"<span id=\"ACS-01C\">ACS-01C: Non-Standard Storage Slot Definition</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):"},{"depth":2,"value":"<span id=\"ACS-02C\">ACS-02C: Non-Streamlined Code</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):"},{"depth":2,"value":"<span id=\"ACS-03C\">ACS-03C: Potentially Inefficient Mapping Layouts</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (b64b659786):"},{"depth":3,"value":"Alleviation (5312126fb2):"},{"depth":2,"value":"<span id=\"ACS-04C\">ACS-04C: Reduced Legibility of Conditionals</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):"},{"depth":2,"value":"<span id=\"ACS-05C\">ACS-05C: Repetitive Invocations of Layout</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):"}]}},"pageContext":{"slug":"/code-style/AccessControlFacetStorage-ACS/","prev":{"label":"TransferRewardMixerStorage.sol (TRS-M)","link":"/manual-review/TransferRewardMixerStorage-TRS"},"next":{"label":"CampaignCreationSkeleton.sol (CCN-C)","link":"/code-style/CampaignCreationSkeleton-CCN"}}},"staticQueryHashes":["1954253342","2328931024","2501019404","973074209"]}